<template>
	<view class="headers">
		<view class="nav-top">
			<view class="status-bar">
				
			</view>
			<view class="topContent">
				<view class="goBack" @tap="getStach" v-if="isBack">
					<slot name="left">
						<image src="../../static/imgs/arrow.png" mode=""></image>
					</slot>
				</view>
				<view class="title">
					<slot name="center">
						<view>{{title}}</view>
					</slot>
				</view>
			</view>
		</view>
		<view class="margin-box">
			
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			isBack:{
				type:Boolean,
				default:true
			},
			title:{
				type:String,
				default:''
			}
		},
		methods:{
			getStach(){
				uni.navigateBack({
					delta:1
				})
			}
		}
	}
</script>

<style scoped>
	.headers{
		position: fixed;
		z-index: 997;
	}
	.nav-top{
		width: 100vw;
		height: 115rpx;
		background-color: white;
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.status-bar{
		height: 64rpx;
	}
	.topContent{
		width: 100vw;
		height: 100rpx;
		display: flex;
		align-items: center;
	}
	.goBack{
		width: 90rpx;
		height: 42rpx;
		padding-left: 20rpx;
		box-sizing: border-box;
		position: relative;
		font-size: 24rpx;
	}
	.goBack image{
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%,-50%);
		width: 40rpx;
		height: 42rpx;
	}
	.title{
		line-height: 115rpx;
		font-size: 32rpx;
		align-items: center;
		color: #344356;
	}
	.margin-box{
		height: 115rpx;
	}
</style>
